<?php
if ( post_password_required() ) {
	return;
}
?>

<div id="comments" class="comments-area">
	<?php
	if ( have_comments() ) : ?>
		<h2><?php echo get_comments_number(); ?> 条评论</h2>

		<ol class="comment-list">
			<?php
				wp_list_comments( array(
					'avatar_size' => 100,
					'style'       => 'ol',
					'short_ping'  => true,
					'reply_text'  => '回复',
				) );
			?>
		</ol>

		<?php the_comments_pagination( array(
			'prev_text' => '&lt;<span class="screen-reader-text">上一页</span>',
			'next_text' => '<span class="screen-reader-text">下一页</span>&gt;',
		) );

	endif; // Check for have_comments().

	// If comments are closed and there are comments, let's leave a little note, shall we?
	if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) : ?>

		<p class="no-comments">评论已经关闭</p>
	<?php
	endif;

	comment_form();
	?>

</div><!-- #comments -->
